package models

type Rule struct {
	RuleId      uint   `xorm:"rule_id notnull int pk autoincr"`
	Name        string `xorm:"name notnull varchar(50)" valid:"required,length(1|50),alphanum"`
	Description string `xorm:"description notnull tinytext" valid:"required,length(1|255)"`
	Valid       uint8  `xorm:"valid notnull tinyint" valid:"required,matches(^(0|1)$)"`
	Mandatory   uint8  `xorm:"mandatory notnull tinyint" valid:"required,matches(^(0|1)$)"`
}

func (r *Rule) TableName() string {
	return "mm_rules"
}
